package engine.newUi
{
	import engine.flag.GameDefine;
	import engine.ui.MainUIManager;
	import engine.ui.lite.BaseUI;
	
	import flash.display.DisplayObjectContainer;
	import flash.display.Shape;
	import flash.display.Sprite;
	import flash.system.Capabilities;
	
	import newx.com.control.window.NxWindow;
	
	public class StrideMainUI extends BaseUI
	{
		private var sprite:Shape=new Shape();
		public function StrideMainUI(popupUI:Boolean=true)
		{
			this.windowBG = new NxWindow();
			this.windowBG.width = 1280;
			this.windowBG.height = 760;
			sprite.graphics.beginFill(0x000000,1);
			sprite.graphics.drawRect(-Capabilities.screenResolutionX/2,-Capabilities.screenResolutionY/2,
				Capabilities.screenResolutionX*2,Capabilities.screenResolutionY*2);
			sprite.graphics.endFill();
			//			MainUIManager.getInstance().downPlace.addChild(sprite);
			addChildAt(sprite,0)
			super(popupUI);
		}
		private var control:StrideMainLogic=StrideMainLogic.getInstance();
		override protected function BeforeShow():void
		{
			this.initPosX = 0;
			this.initPosY = 0;
			this.layout = "center";
			
			control.BeforeShow()
		}
		override protected function AfterHide():void
		{
			//			sprite.graphics.clear();
			control.AfterHide();
			//			MainUIManager.getInstance().intoScene();
		}
		//		override public function show(space:DisplayObjectContainer=null, onshow:Function=null, ...argc):void
		//		{
		//			MainUIManager.getInstance().intoScene(GameDefine.SceneType_StrideMain);
		//		}
	}
}